import axiosHttp from "../index";
import type { ApiResponse } from "../type";
import type { ProjectModel } from "./model";
import type { CreateProjectParams, ListProjectParams } from "./type";

export const getProjectList = (params: ListProjectParams) => {
  return axiosHttp.get<ApiResponse<ProjectModel[]>>("/api/project/list", {
    params,
  });
};

export const createProject = (data: CreateProjectParams) => {
  return axiosHttp.post<ApiResponse<ProjectModel>>("/api/project/create", data);
};
